Update OAuth API key

patch/v1/apikeys/{apikeyId}
Page View

OAuth API key endpoints allow you to view and manage OAuth API keys for a given environment in your Redox organization. Learn more about OAuth API keys, which is our preferred authentication method.

You can retrieve, create, update, or delete OAuth API keys.

Update OAuth API key

Update field values of an existing OAuth API key.

The response contains details about the key with the new values.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v1/apikeys/{apikeyId}' \
2
--request PATCH \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'Content-Type: application/json' \
6
--data '{
7
"name": "string",
8
"jwksURL": "string",
9
"jwkSet": {
10
"keys": [
11
{
12
"kid": "string",
13
"kty": "string"
14
}
15
]
16
}
17
}'

Request Body Schema

    Contains the fields that can be provided when updating a new OAuth API key.

  • name
    string

    Displays the human-readable name of the OAuth API key.

  • jwksURL
    string

    Contains the JWKS URL for the OAuth API key.

  • jwkSet
    object

    Contains a JSON Web Key Set (JWKS). See the JWK Set Format spec for more details.

    • keys
      Array of object

      Contains an array of JWK objects. Each JWK must have a kid and kty, along with some other properties depending on the key type. See the JWK spec for more details.

      • kid
        required, string

        Displays the JWK ID ("Key ID").

      • kty
        required, string

        Identifies the JWK type ("Key type").

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"apikey": {
7
"name": "string",
8
"jwksURL": "string",
9
"jwkSet": {
10
"keys": [
11
{
12
"kid": "string",
13
"kty": "string"
14
}
15
]
16
},
17
"id": "string",
18
"environment": {
19
"id": "string",
20
"environmentFlag": "Staging"
21
}
22
}
23
}
24
}
  • meta
    object
    • version
      string

      Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences.

  • payload
    object

    Contains the payload with details about the requested OAuth API key(s).

    • apikey
      object

      Contains an instance of an OAuth API key.

      • name
        string

        Displays the human-readable name of the OAuth API key.

      • jwksURL
        string

        Contains the JWKS URL for the OAuth API key.

      • jwkSet
        object

        Contains a JSON Web Key Set (JWKS). See the JWK Set Format spec for more details.

        • keys
          Array of object

          Contains an array of JWK objects. Each JWK must have a kid and kty, along with some other properties depending on the key type. See the JWK spec for more details.

          • kid
            required, string

            Displays the JWK ID ("Key ID").

          • kty
            required, string

            Identifies the JWK type ("Key type").

      • id
        string

        Displays the unique identifier (i.e., client ID) of the OAuth API key.

      • environment
        object

        Contains metadata about the environment.

        • id
          string

          Identifies the specific environment that you're operating in or on behalf of.

        • environmentFlag
          string

          Indicates whether the environment is used for development, staging, or production.

          Possible Values: Production, Staging, Development